package com.google.code.p.restrpc.core;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

public interface RpcServiceProxy {
    
    /**
     * for example:helloService.sayHello()
     * 
     * @param methodName
     * @return
     * @throws Throwable
     */
    public Object invoke(String methodName) throws Throwable;
    
    /**
     * for example:mathService.add(1,2)
     * 
     * @param methodName
     * @param jsonArray
     * @return
     * @throws Throwable
     */
    public Object invoke(String methodName, JSONArray jsonArray) throws Throwable;
    
    /**
     * for example:mathService.toHex(16)
     * 
     * @param methodName
     * @param jsonObject
     * @return
     * @throws Throwable
     */
    public Object invoke(String methodName, JSONObject jsonObject) throws Throwable;
    
}
